import request from "@/router/axios";
import {
  fenExYuangettoFixed,
  getLineName,
  getStationName,
  getXieChaStatusFormat,
  sys_data_source_status,
  xieChaStatus
} from "../../../../subwayRat/commonCheck";

/**
 * 车站票款差异待协查
 * @param query
 */
export async function getSwAuStationTicketDifferenceList(query) {
  return request({
    url: "/check/check/getSwAuStationTicketDifferenceList",
    method: "post",
    params: query
  });
}

/**
 * 车站票款差异待协查-添加
 * @param query
 */
export async function addSwAuStationTicketDifference(query) {
  return request({
    url: "/check/check/addSwAuStationTicketDifference",
    method: "post",
    params: query
  });
}

/**
 * 车站票款差异待协查-编辑
 * @param query
 */
export async function updateSwAuStationTicketDifference(query) {
  return request({
    url: "/check/check/updateSwAuStationTicketDifference",
    method: "post",
    params: query
  });
}

/**
 * 车站票款差异待协查-车站结算
 * @param query
 */
export async function chezhanJieSuanSwAuStationTicketDifference(query) {
  return request({
    url: "/check/check/chezhanJieSuanSwAuStationTicketDifference",
    method: "post",
    params: query
  });
}

/**
 * 车站票款差异待协查-通知
 * @param query
 */
export async function noticeSwAuStationTicketDifference(query) {
  return request({
    url: "/check/check/noticeSwAuStationTicketDifference",
    method: "post",
    params: query
  });
}
//车站票款差异--删除
export async function delObj (query) {
   return request({
    url: '/check/check/removeSwAuStationTicketDifferenceByIds',
    method: 'post',
    params: query
  })
}

/**
 * 车站票款差异-现金营收总金额
 * @param query
 */
export async function xianjinYingShouAllAmount(query) {
  return request({
    url: "/check/check/xianjinYingShouAllAmount",
    method: "post",
    params: query
  });
}
/**
 * 车站票款差异-现金营收总金额
 * @param query
 */
export async function xianjinYingShouAllAmounts(query) {
  return request({
    url: "/check/check/cheZhanYingShouAllAmount",
    method: "get",
    params: query
  });
}

export function getCheZhanPKCYoption(th) {
  return {
    submitBtn: th.showType != 3,
    emptyBtn: false,
    group: [
      {
        icon: "",
        label: "",
        // collapse: false,
        prop: "group1",
        column: [{
          label: "结算开始日期",
          prop: "settleBeginDate",
          // width:'250',
          labelWidth: 130,
          type: "date",
          valueFormat: "yyyy-MM-dd",
          disabled: th.showType == 3,
          formslot: true,
          rules: [
            {
              required: true,
              message: "请选择日期",
              trigger: "blur"
            }
          ]
        },
        {
          label: "结算结束日期",
          prop: "settleEndDate",
          // width:'250',
          labelWidth: 130,
          type: "date",
          valueFormat: "yyyy-MM-dd",
          disabled: th.showType == 3,
          formslot: true,
          rules: [
            {
              required: true,
              message: "请选择日期",
              trigger: "blur"
            }
          ]
        },
          {
            label: "线路",
            prop: "lineCode",
            type: "select",
            labelWidth: 130,
            formslot: true,
            disabled: th.showType == 3,
            rules: [
              {
                required: true,
                message: "请选择线路",
                trigger: "blur"
              }
            ]
          },
          {
            label: "站点",
            prop: "stationCode",
            type: "select",
            // width:250,
            labelWidth: 130,
            formslot: true,
            disabled: th.showType == 3,
            rules: [
              {
                required: true,
                message: "请选择站点",
                trigger: "blur"
              }
            ]
          },
          {
            label: "收入日期",
            prop: "incomeTime",
            // width:'250',
            labelWidth: 130,
            formslot: true,
            type: "date",
            valueFormat: "yyyy-MM-dd",
            disabled: th.showType == 3,
            pickerOptions: {
              disabledDate(time) {
                return time.getTime() > Date.now();
              }
            },
            rules: [
              {
                required: true,
                message: "请选择日期",
                trigger: "blur"
              }
            ]
          },
          {
            label: "车站人员",
            prop: "conductorPersonName",
            // width:'250',
            labelWidth: 130,
            type: "select",
            formslot: true,
            disabled: th.showType == 3,
            // rules: [
            //   {
            //     required: true,
            //     message: "请选择人员",
            //     trigger: "blur"
            //   }
            // ]
          },
          {
            label: "车站人员工号",
            prop: "conductorJobNo",
            // width:'250',
            labelWidth: 130,
            type: "select",
            formslot: true,
            disabled: th.showType == 3,
            // rules: [
            //   {
            //     required: true,
            //     message: "请选择人员",
            //     trigger: "blur"
            //   }
            // ]
          },
          
          {
            label: "现金营收总计",
            prop: "cashReceiptsAmount",
            // width:'250',
            labelWidth: 130,
            type: "input",
            disabled: true,
            formslot: true,
            rules: [
              {
                required: true,
                message: "不能为空",
                trigger: "blur"
              }
            ]
          },
          {
            label: "补款金额",
            prop: "shortAmount",
            // width:'250',
            labelWidth: 130,
            type: "input",
            disabled: true,
            formslot: true,
            rules: [
              {
                required: true,
                message: "不能为空",
                trigger: "blur"
              }
            ]
          },
          {
            label: "现金缴款金额",
            prop: "cashPayAmount",
            // width:'250',
            labelWidth: 130,
            type: "number",
            precision: 2,
            disabled: th.showType == 3,
            formslot: true,
            rules: [
              {
                required: true,
                message: "不能为空",
                trigger: "blur"
              }
            ]
          },
          // {
          //   label: "车站营收金额",
          //   prop: "stationReceiptsAmount",
          //   // width:'250',
          //   labelWidth: 130,
          //   type: "number",
          //   precision: 2,
          //   disabled: th.showType == 3,
          //   formslot: true,
          //   rules: [
          //     {
          //       required: true,
          //       message: "不能为空",
          //       trigger: "blur"
          //     }
          //   ]
          // },
          {
            label: "差异金额",
            prop: "diffAmount",
            // width:'250',
            labelWidth: 130,
            type: "number",
            precision: 2,
            disabled: th.showType == 3,
            formslot: true,
            rules: [
              {
                required: true,
                message: "不能为空",
                trigger: "blur"
              }
            ]
          },
          {
            label: "备注",
            prop: "remark",
            width: 350,
            labelWidth: 130,
            type: "textarea",
            disabled: th.showType == 3
          }
        ]
      }
    ]
  };
}
